﻿<common:LayoutAwarePage
    x:Class="BasicLight.Client.Views.Index"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:BasicLight.Client"
    xmlns:common="using:BasicLight.Common"
    xmlns:include="using:BasicLight.Client.Includes"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DesignHeight="768"
    d:DesignWidth="1366">

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="120"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <include:Background Grid.RowSpan="2"/>

        <include:Navigation VerticalAlignment="Bottom"/>

        <ScrollViewer Grid.Row="1" VerticalScrollMode="Disabled" ZoomMode="Disabled" HorizontalScrollBarVisibility="Visible" VerticalScrollBarVisibility="Disabled" Style="{StaticResource Blue-ScrollViewer}">
            <StackPanel Orientation="Horizontal" Margin="120,50,0,0">

                <Grid Margin="0,0,70,0">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="42"/>
                        <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>

                    <TextBlock Text="近期播放" Style="{StaticResource GroupHeaderText}" VerticalAlignment="Bottom"/>

                    <VariableSizedWrapGrid Grid.Row="1" Orientation="Vertical" ItemWidth="145" ItemHeight="145" VerticalAlignment="Top" Margin="0,20,0,0">
                        <Button VariableSizedWrapGrid.ColumnSpan="2" VariableSizedWrapGrid.RowSpan="2" Click="RadioClick">
                            <Button.Template>
                                <ControlTemplate>
                                    <Grid Width="300" Height="300" Margin="0,0,10,10">
                                        <Border CornerRadius="20" Background="{StaticResource Blue-ThemeBrush}">
                                            <!--<Border.Background>
                                                <ImageBrush ImageSource="" Stretch="UniformToFill" AlignmentX="Right" AlignmentY="Bottom"/>
                                            </Border.Background>-->
                                        </Border>
                                        <TextBlock></TextBlock>
                                    </Grid>
                                </ControlTemplate>
                            </Button.Template>
                        </Button>
                        <Grid Width="150" Height="150" Background="{StaticResource Blue-ThemeBrush}" Margin="0,0,10,10">
                        </Grid>
                        <Grid Width="150" Height="150" Margin="0,0,10,10" VerticalAlignment="Bottom" HorizontalAlignment="Right">
                            <Border CornerRadius="20" Background="{StaticResource Blue-ThemeBrush}">
                                <!--<Border.Background>
                                    <ImageBrush ImageSource="/Assets/巴彦淖尔黄河之声广播.jpg" Stretch="UniformToFill" AlignmentX="Right" AlignmentY="Bottom"/>
                                </Border.Background>-->
                            </Border>
                            <TextBlock></TextBlock>
                        </Grid>
                    </VariableSizedWrapGrid>
                </Grid>

                <Grid Margin="0,0,70,0">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="42"/>
                        <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>

                    <TextBlock Text="推荐电台" Style="{StaticResource GroupHeaderText}" VerticalAlignment="Bottom"/>

                    <VariableSizedWrapGrid Grid.Row="1" Orientation="Vertical" ItemWidth="145" ItemHeight="145" VerticalAlignment="Top" Margin="0,20,0,0">
                        <Grid Width="300" Height="300" Margin="0,0,10,10" VariableSizedWrapGrid.ColumnSpan="2" VariableSizedWrapGrid.RowSpan="2">
                            <Border CornerRadius="20" Background="{StaticResource Blue-ThemeBrush}">
                                <!--<Border.Background>
                                    <ImageBrush ImageSource="" Stretch="UniformToFill" AlignmentX="Right" AlignmentY="Bottom"/>
                                </Border.Background>-->
                            </Border>
                            <TextBlock></TextBlock>
                        </Grid>
                        <Grid Width="150" Height="150" Background="{StaticResource Blue-ThemeBrush}" Margin="0,0,10,10">
                        </Grid>
                        <Grid Width="145" Height="145" Background="{StaticResource Blue-ThemeBrush}" Margin="0,0,10,10">

                        </Grid>
                        <Grid Width="145" Height="145" Background="{StaticResource Blue-ThemeBrush}" Margin="0,0,10,10">

                        </Grid>
                        <Grid Width="145" Height="145" Background="{StaticResource Blue-ThemeBrush}" Margin="0,0,10,10">

                        </Grid>
                        <Grid Width="150" Height="150" Margin="0,0,10,10" VerticalAlignment="Bottom" HorizontalAlignment="Right">
                            <Border CornerRadius="20" Background="{StaticResource Blue-ThemeBrush}">
                                <!--<Border.Background>
                                    <ImageBrush ImageSource="/Assets/巴彦淖尔黄河之声广播.jpg" Stretch="UniformToFill" AlignmentX="Right" AlignmentY="Bottom"/>
                                </Border.Background>-->
                            </Border>
                            <TextBlock></TextBlock>
                        </Grid>
                    </VariableSizedWrapGrid>
                </Grid>

                <Grid Margin="0,0,50,0">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="42"/>
                        <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>

                    <TextBlock Text="电台排行" Style="{StaticResource GroupHeaderText}" VerticalAlignment="Bottom"/>
                    <Button HorizontalAlignment="Right" Width="34" Height="34" VerticalAlignment="Bottom" Margin="0,0,10,0" Click="MoreClick">
                        <Button.Template>
                            <ControlTemplate>
                                <Grid>
                                    <Rectangle Fill="{StaticResource Blue-ThemeBrush}"/>
                                    <Line StrokeThickness="1.4" X1="10" Y1="17" X2="24" Y2="17" Stroke="White"/>
                                    <Line StrokeThickness="1.4" X1="17" Y1="10" X2="17" Y2="24" Stroke="White"/>
                                </Grid>
                            </ControlTemplate>
                        </Button.Template>
                    </Button>
                    
                    <VariableSizedWrapGrid Grid.Row="1" Orientation="Vertical" ItemWidth="145" ItemHeight="145" VerticalAlignment="Top" Margin="0,20,0,0">
                        <Grid Width="300" Height="300" Margin="0,0,10,10" VariableSizedWrapGrid.ColumnSpan="2" VariableSizedWrapGrid.RowSpan="2">
                            <Border CornerRadius="20" Background="{StaticResource Blue-ThemeBrush}">
                                <!--<Border.Background>
                                    <ImageBrush ImageSource="" Stretch="UniformToFill" AlignmentX="Right" AlignmentY="Bottom"/>
                                </Border.Background>-->
                            </Border>
                            <TextBlock></TextBlock>
                        </Grid>
                        <Grid Width="150" Height="150" Background="{StaticResource Blue-ThemeBrush}" Margin="0,0,10,10">
                        </Grid>
                        <Grid Width="145" Height="145" Background="{StaticResource Blue-ThemeBrush}" Margin="0,0,10,10">

                        </Grid>
                        <Grid Width="145" Height="145" Background="{StaticResource Blue-ThemeBrush}" Margin="0,0,10,10">

                        </Grid>
                        <Grid Width="145" Height="145" Background="{StaticResource Blue-ThemeBrush}" Margin="0,0,10,10">

                        </Grid>
                        <Grid Width="145" Height="145" Background="{StaticResource Blue-ThemeBrush}" Margin="0,0,10,10">

                        </Grid>
                        <Grid Width="145" Height="145" Background="{StaticResource Blue-ThemeBrush}" Margin="0,0,10,10">

                        </Grid>
                        <Grid Width="145" Height="145" Background="{StaticResource Blue-ThemeBrush}" Margin="0,0,10,10">

                        </Grid>
                         <Grid Width="145" Height="145" Background="{StaticResource Blue-ThemeBrush}" Margin="0,0,10,10">

                        </Grid>
                        <Grid Width="145" Height="145" Background="{StaticResource Blue-ThemeBrush}" Margin="0,0,10,10">

                        </Grid>
                        <Grid Width="145" Height="145" Background="{StaticResource Blue-ThemeBrush}" Margin="0,0,10,10">

                        </Grid>
                        <Grid Width="145" Height="145" Background="{StaticResource Blue-ThemeBrush}" Margin="0,0,10,10">

                        </Grid>
                        <Grid Width="145" Height="145" Background="{StaticResource Blue-ThemeBrush}" Margin="0,0,10,10">

                        </Grid>
                        <Grid Width="145" Height="145" Background="{StaticResource Blue-ThemeBrush}" Margin="0,0,10,10">

                        </Grid>
                        <Grid Width="150" Height="150" Margin="0,0,10,10" VerticalAlignment="Bottom" HorizontalAlignment="Right">
                            <Border CornerRadius="20" Background="{StaticResource Blue-ThemeBrush}">
                                <!--<Border.Background>
                                    <ImageBrush ImageSource="/Assets/巴彦淖尔黄河之声广播.jpg" Stretch="UniformToFill" AlignmentX="Right" AlignmentY="Bottom"/>
                                </Border.Background>-->
                            </Border>
                            <TextBlock></TextBlock>
                        </Grid>
                    </VariableSizedWrapGrid>
                </Grid>
            </StackPanel>
        </ScrollViewer>

        <Canvas Grid.RowSpan="2">
            <include:Scene x:Name="scene"/>
        </Canvas>
        
    </Grid>

    <Page.TopAppBar>
        <AppBar x:Name="topAppBar" Background="Transparent" BorderBrush="Transparent" Padding="0" Margin="0,-2,0,0">
            <Grid>
                <Border Background="White" Opacity="0.75"/>
                <StackPanel Orientation="Horizontal" Margin="20">
                    <Button HorizontalAlignment="Left" VerticalAlignment="Top" Style="{StaticResource Blue-RecommandedCommandButton}" Height="42" Padding="0" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" Margin="0,0,20,0" Click="HomeClick">
                        <StackPanel Margin="-5" Orientation="Horizontal">
                            <Image Source="/Assets/Icons/HomeTopbar.png" Height="22" Margin="0,0,10,0"/>
                            <TextBlock TextWrapping="Wrap" Text="电台首页" Style="{StaticResource SpeedLinkTitleText}"/>
                        </StackPanel>
                    </Button>
                    <Button HorizontalAlignment="Left" VerticalAlignment="Top" Style="{StaticResource Blue-RecommandedCommandButton}" Height="42" Padding="0" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" Margin="0,0,20,0">
                        <StackPanel Margin="-5" Orientation="Horizontal">
                            <Image Source="/Assets/Icons/FavoriteTopbar.png" Height="22" Margin="0,0,10,0"/>
                            <TextBlock TextWrapping="Wrap" Text="调频收藏" Style="{StaticResource SpeedLinkTitleText}"/>
                        </StackPanel>
                    </Button>
                    <Button HorizontalAlignment="Left" VerticalAlignment="Top" Style="{StaticResource Blue-RecommandedCommandButton}" Height="42" Padding="0" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" Margin="0,0,20,0">
                        <StackPanel Margin="-5" Orientation="Horizontal">
                            <Image Source="/Assets/Icons/TipTopbar.png" Height="22" Margin="0,0,10,0"/>
                            <TextBlock TextWrapping="Wrap" Text="订阅提醒" Style="{StaticResource SpeedLinkTitleText}"/>
                        </StackPanel>
                    </Button>
                    <Button HorizontalAlignment="Left" VerticalAlignment="Top" Style="{StaticResource Blue-RecommandedCommandButton}" Height="42" Padding="0" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" Margin="0,0,20,0">
                        <StackPanel Margin="-5" Orientation="Horizontal">
                            <Image Source="/Assets/Icons/OfflineTopbar.png" Height="22" Margin="0,0,10,0"/>
                            <TextBlock TextWrapping="Wrap" Text="离线电台" Style="{StaticResource SpeedLinkTitleText}"/>
                        </StackPanel>
                    </Button>
                </StackPanel>
            </Grid>
        </AppBar>
    </Page.TopAppBar>
    
    <Page.BottomAppBar>
        <AppBar x:Name="bottomAppBar" Background="Transparent" BorderBrush="Transparent" Padding="0" Margin="0,0,0,-2">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="50*"/>
                    <ColumnDefinition Width="50*"/>
                </Grid.ColumnDefinitions>

                <Border Background="{StaticResource Blue-ThemeBrush}" Opacity="0.75" Grid.ColumnSpan="2"/>

                <StackPanel x:Name="rightPanel" Orientation="Horizontal" Grid.Column="1" HorizontalAlignment="Right" Margin="0,0,20,0">
                    <Button x:Name="refresh" Style="{StaticResource RefreshAppBarButtonStyle}" Tag="{Binding Path=AppName, Source={StaticResource Languages}}" AutomationProperties.Name="{Binding Path=Refresh, Source={StaticResource Languages}}" Click="OnRefreshClick"/>
                </StackPanel>
            </Grid>
        </AppBar>
    </Page.BottomAppBar>
</common:LayoutAwarePage>